﻿using System;
using System.Drawing;
using System.Linq;
using Mimas.Imaging.Filters;
using Mimas.Imaging.Filters.CompositeFilters;
using Mipic.Infrastructure.Services;

namespace Mipic.Moduls.Filters.Services
{
    public class FilterService : IFilterService
    {
        
        #region //--------- Interface Members -----------//
        
        public Bitmap Apply(Bitmap image, string filterName)
        {
            Bitmap result = null;
            
            switch (filterName)
            {
                case "Filter11":
                    result = new Filter11().Apply(image);
                    break;
                case "Filter12":
                    result = new Filter12().Apply(image);
                    break;
                case "Filter13":
                    result = new Filter13().Apply(image);
                    break;
                case "Filter14":
                    result = new Filter14().Apply(image);
                    break;
                case "Filter15":
                    result = new Filter15().Apply(image);
                    break;
                case "Filter21":
                    result = new Filter21().Apply(image);
                    break;
                case "Filter22":
                    result = new Filter22().Apply(image);
                    break;
                case "Filter23":
                    result = new Filter23().Apply(image);
                    break;
                case "Filter24":
                    result = new Filter24().Apply(image);
                    break;
                case "Filter25":
                    result = new Filter25().Apply(image);
                    break;
                case "Filter31":
                    result = new Filter31().Apply(image);
                    break;
                case "Filter32":
                    result = new Filter32().Apply(image);
                    break;
                case "Filter33":
                    result = new Filter33().Apply(image);
                    break;
                case "Filter34":
                    result = new Filter34().Apply(image);
                    break;
                case "Filter35":
                    result = new Filter35().Apply(image);
                    break;
                case "Filter41":
                    result = new Filter41().Apply(image);
                    break;
                case "Filter42":
                    result = new Filter42().Apply(image);
                    break;
                case "Filter43":
                    result = new Filter43().Apply(image);
                    break;
                case "Filter44":
                    result = new Filter44().Apply(image);
                    break;
                case "Filter45":
                    result = new Filter45().Apply(image);
                    break;
                case "Filter51":
                    result = new Filter51().Apply(image);
                    break;
                case "Filter52":
                    result = new Filter52().Apply(image);
                    break;
                case "Filter53":
                    result = new Filter53().Apply(image);
                    break;
                case "Filter54":
                    result = new Filter54().Apply(image);
                    break;
                case "Filter55":
                    result = new Filter55().Apply(image);
                    break;
            }

            return result;
        }

        #endregion

    }
}